import request from '@/utils/request';

export async function getWorkHoursRequestHstByPage(params: any) {
  return request('/api/product/getWorkHoursRequestHstByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addWorkHoursRequestHst(params: any) {
  return request('/api/product/addWorkHoursRequestHst', {
    method: 'POST',
    data: params,
  });
}

export async function updateWorkHoursRequestHst(params: any) {
  return request('/api/product/updateWorkHoursRequestHst', {
    method: 'POST',
    data: params,
  });
}

export async function delWorkHoursRequestHst(params: any) {
  return request('/api/product/delWorkHoursRequestHst', {
    method: 'POST',
    data: params,
  });
}

export async function exportWorkHoursRequestHst(params: any) {
  return request('/api/product/exportWorkHoursRequestHst', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}

// 获取当前用户名
export async function viewBaseInfo(params: any) {
  return request('/api/user/viewBaseInfo', {
    method: 'POST',
    data: params,
  });
}
export default {
  getWorkHoursRequestHstByPage,
  addWorkHoursRequestHst,
  updateWorkHoursRequestHst,
  delWorkHoursRequestHst,
  exportWorkHoursRequestHst,
};
